package com.bawei.mall.user.controller;

import com.bawei.common.core.domain.R;
import com.bawei.mall.user.domain.CusUser;
import com.bawei.mall.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/findByName")
    public R<CusUser> findByName(@RequestParam("username") String username){
        CusUser user = userService.findByName(username);
        return R.ok(user);
    };

}
